package com.hyt.it.ogt.kq.common.utils;

import com.hyt.it.ogt.kq.common.gov.constant.fjcitybm.SendContentTemplateEnum;

import java.util.Objects;

/**
 * @author 朱振宇
 * @since 2024-01-24
 */
public class SendContentReplaceUtils {

    public static String replace(Integer code, String content, String[] params) {
        switch (Objects.requireNonNull(SendContentTemplateEnum.getSendMessageTypeEnumByCode(code))) {
            case REGISTER:
                return content.replace("#考生姓名#", params[0]).replace("#报名名称#", params[1]).replace("#报名地址#", params[2]);
            default:
                return content;
        }
    }

}
